package InterfaceTest;
/*
继承和实现都存在的话，代码应该怎么写
    extends关键字在前
    implements关键字在后
 */
public class InterfaceTest3 {
    public static void main(String[] args){
        Flyable c = new Cat();
        c.fly();
    }
}
class Animal{

}
interface Flyable{
    void fly();
}
class Cat extends Animal implements Flyable{
    public void fly(){
        System.out.println("我是一只会飞的猫！");
    }
}
